package com.shuiying.hikari.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

/**
 * <p>
 * 
 * </p>
 *
 * @author hikari
 * @since 2025-06-06
 */
@Getter
@ApiModel(value = "User对象", description = "")
public class User implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("账户")
    private String zh;

    @ApiModelProperty("用户名")
    private String name;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("年龄")
    private Integer age;

    @ApiModelProperty("性别")
    private String sex;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("账户创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("账户更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("角色权限，0超级管理员，1管理员，2普通用户")
    private Integer rule;

    @ApiModelProperty("账户是否有效，0无效，1有效")
    private Integer isValid;

    public void setId(Integer id) {
        this.id = id;
    }

    public void setZh(String zh) {
        this.zh = zh;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public void setRule(Integer rule) {
        this.rule = rule;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    @Override
    public String toString() {
        return "User{" +
            "id = " + id +
            ", zh = " + zh +
            ", name = " + name +
            ", password = " + password +
            ", age = " + age +
            ", sex = " + sex +
            ", phone = " + phone +
            ", email = " + email +
            ", createTime = " + createTime +
            ", updateTime = " + updateTime +
            ", rule = " + rule +
            ", isValid = " + isValid +
        "}";
    }
}
